<?php
class Integral_typeAction extends IntesysAction {
	public function index(){
		$this->list=$this->dao->where(['site_id'=>__SITEID__])->select();
		$this->display();
	}
	public function edit(){
		if($this->_get('id')){
			$this->info=$this->dao->where(['site_id'=>__SITEID__,'id'=>$this->_get('id')])->find();
			$this->Integrals = C('Integrals');
			$this->display();
		}
	}
	public function update(){
		if($this->_post('id')){
			if(''!=$_POST['aimtype']&&''!=$_POST['aimratio']){
                $_POST['aimratio']=serialize(array($_POST['aimtype']=>$_POST['aimratio']));    
            }
			parent::update();	
		}
	}
}

